package com.jinlejia.erp.utils;


import com.jinlejia.erp.bean.CitysBean;

import java.io.Serializable;
import java.util.Comparator;

/**
 * Created by Administrator on 2017/7/4 0004.
 */

public class PinyinCityComparator implements Comparator<CitysBean>,Serializable {
    public int compare(CitysBean o1, CitysBean o2) {
        if (o1.getCityPacket().equals("@")
                || o2.getCityPacket().equals("#")) {
            return -1;
        } else if (o1.getCityPacket().equals("#")
                || o2.getCityPacket().equals("@")) {
            return 1;
        } else {
            return o1.getCityPacket().compareTo(o2.getCityPacket());
        }
    }
}
